"""trcs URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from apps.software import views
urlpatterns = [
    # path('admin/', admin.site.urls),
    path('login',views.getUser),
    path('hello/',views.hello),
    path('rights',views.getRights), #获取右侧菜单栏
    path('ecm/', views.getEcm),  # 获得配电柜型号选择菜单接口
    path('ecz/', views.getEcz),  # 获得配电柜尺寸选择菜单接口
    path('ec/', views.getEc),  # 获得项目所选的的配电柜数据接口
    path('ec/add/', views.add_Ec),  # 添加项目所选择的配电柜数据接口
    path('ec/update/', views.update_Ec),  # 修改项目所选择的配电柜信息接口
    path('ec/delete/', views.delete_Ec),  # 修改项目所选择的配电柜信息接口
    path('getHeatDevice/',views.getHeatDevice),#获取热损耗列表
    path('getComponentGroup/',views.getComponentGroup),
    path('sendDeviceData/',views.sendDeviceData),
    path('submitDevice/',views.submitDevice),
    path('deleteDevice/',views.deleteDevice),
    path('submitDeviceData/',views.submitDeviceData),
]

# #添加这行--- 允许所有的media文件被访问
# urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
